/**
 * @title FixedSpeedScroller.java
 * @package com.esun.cheetah.view.match.matchlist
 * @description 
 * @author liugan
 * @date 2012-7-31
 * @copyright 深圳市易讯天空
 */
package com.esun.cheetah.view.match.matchlist;

import android.content.Context;
import android.view.animation.Interpolator;
import android.widget.Scroller;

/**
 * @title FixedSpeedScroller
 * @description 用来延长ViewPager切换视图动画的时间
 * @author liugan
 */
public class FixedSpeedScroller extends Scroller {

    private int mDuration = 300;

    public FixedSpeedScroller(Context context) {
        super(context);
    }

    public FixedSpeedScroller(Context context, Interpolator interpolator) {
        super(context, interpolator);
    }


    @Override
    public void startScroll(int startX, int startY, int dx, int dy, int duration) {
        // Ignore received duration, use fixed one instead
        super.startScroll(startX, startY, dx, dy, mDuration);
    }

    @Override
    public void startScroll(int startX, int startY, int dx, int dy) {
        // Ignore received duration, use fixed one instead
        super.startScroll(startX, startY, dx, dy, mDuration);
    }
}
